package com.woniu.commentorder.console;

import com.woniu.commentorder.Util.UtilClass;
import com.woniu.commentorder.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("Goods")
public class GoodsConsole {
    @Autowired
    private GoodService goodService;
    @PostMapping("/de")
    public String decstock(UtilClass utilClass){
        goodService.destock(utilClass.getNum(),utilClass.getId());
        return "减少库存成功";
    }
}
